import React from 'react'

import {renderRoutes} from 'react-router-config'

import {HeaderWrapper,TopMenu} from './style'
import {dicoverMenu} from '@/common/loacl-data'

import { NavLink } from 'react-router-dom'
export default function index(props) {
    const {route} = props
    return (
        <div>
            <HeaderWrapper>
                <TopMenu className='content wrap-v2'>
                    <div className='info'>
                        {
                            dicoverMenu.map((item)=>{
                                return (
                                    <div className='item' key={item.title}>
                                        <NavLink to={item.link}>{item.title}</NavLink>
                                    </div>
                                )
                            })
                        }
                    </div>
                </TopMenu>
            </HeaderWrapper>
            {renderRoutes(route.routes)}
        </div>
        
    )
}
